package com.wdhcr.service;


import com.wdhcr.entity.Type;
import javassist.NotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface TypeService {
    //    新增
    Type saveType(Type type);

    //    查询
    Type getType(Long id);

    List<Type> listType();

    List<Type> listTypeTop(Integer size);

    Type getTypeByName(String name);

    Page<Type> listType(Pageable pageable);

    Type updateType(Long id, Type type) throws NotFoundException;

    void deleteType(Long id);
}
